Skip to content

.NET: CI hardening — split Functions tests, re-enable skipped integration tests#5717

Merged
giles17 merged 14 commits into
mainfrom
dotnet-split-integration-tests
May 12, 2026
Merged

.NET: CI hardening — split Functions tests, re-enable skipped integration tests#5717
giles17 merged 14 commits into
mainfrom
dotnet-split-integration-tests

Conversation

@giles17
Copy link
Copy Markdown
Contributor

@giles17 giles17 commented May 8, 2026

Motivation and Context

Improve CI signal quality by splitting long-running integration tests into a dedicated job and re-enabling integration tests that were unnecessarily skipped.

Description

CI job split:

  • Add -TestProjectNameExclude parameter to New-FilteredSolution.ps1
  • Add functions and core path filters to the paths-filter job
  • Exclude DurableTask/AzureFunctions projects from the main dotnet-test job
  • Remove emulator setup step from dotnet-test (no longer needed)
  • Add new dotnet-test-functions job (ubuntu/net10.0 only, path-conditional)
  • Update merge gate and report job to include dotnet-test-functions

Re-enable Anthropic integration tests:

  • Upgrade Anthropic SDK 12.13.0 to 12.20.0 to fix M.E.AI incompatibility
  • Fix unit test mocks for SDK 12.20.0 interface changes

Re-enable CheckSystem declarative integration tests:

  • Remove temporary skip from DeclarativeWorkflowTest.cs and DeclarativeCodeGenTest.cs
  • Fix CheckSystem.json test case: set min_response_count: 1, max_response_count: 1, and explicit min/max_message_count: 0 to match SendActivity behavior (response events emitted but no messages stored)

Re-enable Foundry OpenAPI integration test:

  • Remove Skip = "For manual testing only" from AsAIAgent_WithOpenAPITool_NativeSDKCreation_InvokesServerSideToolAsync
  • Test already uses RetryFact(3 retries, 5s delay) for transient failure resilience

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

- Add -TestProjectNameExclude parameter to New-FilteredSolution.ps1
- Add 'functions' and 'core' path filters to paths-filter job
- Exclude DurableTask/AzureFunctions from main dotnet-test job
- Remove emulator setup from dotnet-test (no longer needed)
- Add new dotnet-test-functions job (ubuntu/net10.0 only, path-conditional)
- Update merge gate and report job to include dotnet-test-functions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 8, 2026 14:26
@moonbox3 moonbox3 added the .NET label May 8, 2026
@github-actions github-actions Bot changed the title Split DurableTask/AzureFunctions integration tests into dedicated CI job .NET: Split DurableTask/AzureFunctions integration tests into dedicated CI job May 8, 2026
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Code Review

Reviewers: 4 | Confidence: 91%

✓ Correctness

The PR correctly splits DurableTask/AzureFunctions integration tests into a dedicated CI job. The path filters, conditional logic, merge gate updates, and PowerShell script changes are all properly implemented. The new TestProjectNameExclude parameter correctly iterates over patterns and is applied after TestProjectNameFilter. The merge gate handles skipped jobs correctly since 'skipped' results don't trigger the failure/cancelled checks. The report job's artifact download pattern correctly matches the new artifact name.

✓ Security Reliability

This PR is a clean CI refactoring that splits DurableTask/AzureFunctions integration tests into a dedicated job. The merge gate correctly handles skipped jobs (result='skipped' doesn't match 'failure' or 'cancelled' checks), the PowerShell exclusion parameter is properly implemented, secrets are used consistently with existing patterns, and path filters appropriately trigger the new job when core dependencies change. No security or reliability issues identified.

✓ Test Coverage

This PR is a CI infrastructure change that splits DurableTask/AzureFunctions integration tests into a dedicated job and adds a -TestProjectNameExclude parameter to New-FilteredSolution.ps1. The new parameter has implicit functional coverage through the CI workflow (the filtered solution is used by dotnet test, so failures would surface). However, there are no dedicated unit tests (Pester tests) for the script — this is a pre-existing gap, not introduced by this PR. The existing parameters (e.g., -TestProjectNameFilter) also lack isolated tests. The workflow logic is sound: path filters, merge gate inclusion, and artifact naming all align correctly.

✗ Design Approach

The split-job approach is mostly sound, but the new path gating for dotnet-test-functions misses part of the DurableTask/AzureFunctions dependency chain. As written, a change limited to Microsoft.Agents.AI.Workflows.Generators can alter those integration-test binaries while causing the dedicated functions job to skip, and the main dotnet-test job now excludes those same integration tests.

Flagged Issues

  • The new core path filter in .github/workflows/dotnet-build-and-test.yml omits dotnet/src/Microsoft.Agents.AI.Workflows.Generators/**, even though DurableTask depends on Microsoft.Agents.AI.Workflows (dotnet/src/Microsoft.Agents.AI.DurableTask/Microsoft.Agents.AI.DurableTask.csproj:30) and Microsoft.Agents.AI.Workflows includes Microsoft.Agents.AI.Workflows.Generators.csproj as analyzer (dotnet/src/Microsoft.Agents.AI.Workflows/Microsoft.Agents.AI.Workflows.csproj:34-39). With the new exclusion of DurableTask/AzureFunctions ITs from the main job, generator-only changes can now skip all affected integration tests.

Suggestions

  • Expand the core paths-filter block to include dotnet/src/Microsoft.Agents.AI.Workflows.Generators/** source-generator changes still trigger dotnet-test-functions for the DurableTask/AzureFunctions dependency chain.

Automated review by giles17's agents

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Splits the DurableTask and Azure Functions integration tests out of the main .github/workflows/dotnet-build-and-test.yml dotnet-test job into a dedicated CI job to avoid emulator setup overhead in the primary test matrix and to enable more granular path-based job triggering.

Changes:

  • Added -TestProjectNameExclude support to dotnet/eng/scripts/New-FilteredSolution.ps1 to remove specific test projects after applying -TestProjectNameFilter.
  • Extended paths-filter with functions and core filters and used them to conditionally run a new dotnet-test-functions job (ubuntu/net10.0 only).
  • Excluded DurableTask/AzureFunctions integration test projects from the main integration-test solution generation and removed the emulator setup from the main dotnet-test job.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
dotnet/eng/scripts/New-FilteredSolution.ps1 Adds an exclusion parameter to filter out specific test projects when generating filtered .slnx files.
.github/workflows/dotnet-build-and-test.yml Introduces path filters and a new dedicated job to run DurableTask/AzureFunctions integration tests with emulator setup.

Comment thread .github/workflows/dotnet-build-and-test.yml
@giles17 giles17 marked this pull request as draft May 8, 2026 14:36
…tnetChanges gate from functions job

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes MissingMethodException on WebSearchToolResultContent.get_Results()
caused by Anthropic 12.13.0 being compiled against an older
Microsoft.Extensions.AI.Abstractions version.

Suppress RT0003 in AI.Abstractions.csproj as the transitive reference
from the upgraded Anthropic SDK conflicts with the explicit one.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread dotnet/eng/scripts/New-FilteredSolution.ps1 Outdated
TestProjectNameFilter  -> TestProjectNameIncludeFilter
TestProjectNameExclude -> TestProjectNameExcludeFilter

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
giles17 and others added 3 commits May 12, 2026 08:16
The RT0003 suppression was added during the Anthropic SDK 12.20.0
upgrade but the warning no longer fires. Removing it to keep the
NoWarn list minimal.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ation-tests

# Conflicts:
#	dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicSkillsIntegrationTests.cs
Both our branch and main added WebhookKey to the Anthropic test
mock classes, resulting in CS0102 duplicate definition errors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants